<#include "./template.ftl">

<#macro head>
    <title>招聘-Morketing</title>
    <link rel="stylesheet" href="${base}/client/css/zhaopin.css">
</#macro>
<#macro content>
        <div id="contents">
            <div class="main wrap clearfix">
                <div class="main-left f-l clearfix">
                    <#if hire??>
                    <div class="zhaopin-left zhaopin-detail">
                        <div class="bar"><img width="100%" src="${base}/system/getImg?imgId=${hire.iconUrl}&w=780" alt=""></div>
                        <h2 class="title">${hire.name}</h2>
                        <p class="time">Morketing  |  ${hire.createTimeStr}</p>
                        <div class="mod-zhao">
                             <h3>关于我们</h3>
                             <p>
                             ${hire.aboutUs}
                             </p>
                        </div>

                        <div class="mod-zhao">
                             <h3>在招职位</h3>
                            <p>
                            ${hire.discription}
                            </p>
                        </div>

                        <div>
                            <h3>联系方式及联系人</h3>
                            <p>
                        <#if no_login??><input type="button" value="获取联系方式" onclick="getContact()"/> <#else> ${hire.contact}</#if>
                            </p>
                        </div>

                    </div>
                    </#if>
                </div>
                <div class="main-right f-r clearfix zhaopin-right">
                    <#include "widget/hotHIre.ftl"/>
                </div>
            </div>
</#macro>
<#macro js>
    <script type="text/javascript">
        function getContact(){
            alert("您还没有登录，请登录！");
            location.replace("${base}/login?redirect_url=" + window.location.href);
        }




    </script>

<script>

    window.onload=function(){
        var obj = $(".hot-work");
                            var offsetT = obj.offset().top;
                            var offsetL= obj.offset().left;
                            var objH=obj.height();

                            var leftH=$('.main-left').height();
                            var leftT=$('.main-left').offset().top;

                            var mixT=leftH-objH+leftT-64;

                                $(document).on('scroll',function(){
                                    var scrollT=$(document).scrollTop();
                                    if(scrollT > offsetT-64 && scrollT < mixT ){
                                        obj.css({
                                            position:'fixed',
                                            top:'84px',
                                            left:offsetL,
                                            right:'auto',
                                            bottom:'auto'
                                        })
                                    }else if(scrollT > mixT){
                                        obj.css({
                                            position:'absolute',
                                            left:auto,
                                            top:'auto',
                                            right:0,
                                            bottom:0
                                        })

                                    }else{
                                        obj.css({
                                            position:'static'
                                        })
                                    }

                                })

    }
</script>
</#macro>
